<form id="form_{{ hash }}" action="{{ url }}" method="post">
    <span class="formtitle">{{ title }}</span>
    {{ form.as_p }}
    <input type="button" value="{{ submit|default:"提交" }}" onclick="$('#success_{{ hash }}').html('请等待...');var options={success: function(data){left.refresh(true);$('#success_{{ hash }}').html(data);content.display()}, error: function(data){alert(data.responseText);}}; $('#form_{{ hash }}').ajaxSubmit(options);" />
    {% if method %}
    <input type="hidden" name="_method" value="{{ method }}" />
    {% endif %}
    <input type="button" value="清空表单" onclick="$('#form_{{ hash }}').clearForm()" />
    {% if delete_url %}
    <input type="button" value="删除记录" onclick="delete_record('{{ delete_url }}', 'success_{{ hash }}');left.refresh(true)" />
    {% endif %}
    <span id="success_{{ hash }}" class="success"></span>
</form>
